<%
'#################################################################################
'## UnWritten Open Source Blog Engine
'#################################################################################
'## Copyright (C) 2008 Luigi Violin
'##
'## This program is free software: you can redistribute it and/or modify
'## it under the terms of the GNU General Public License as published by
'## the Free Software Foundation, either version 2 of the License, or
'## (at your option) any later version.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program.  If not, see <http://www.gnu.org/licenses/>.
'##
'## You can obtain support from our forums at:
'##     <http://www.unwrittenblog.com/forums/>
'## Contact the author directly:
'##     <zaamit@hotmail.com/>
'##
'#################################################################################
%>
<%
u_name = request.QueryString("name")
if u_name = "Guest" then Response.Redirect("/signup.asp")

page_name = ""
page_action = "user-profile"
return_url = request.ServerVariables("HTTP_REFERER")
%>

<!--#include virtual="/default.asp"-->

<%
function userprofile()
	dbRS2.open "select id,login from " & db_prefix & "users where login = '" & request.QueryString("name") & "'",dbConn
	u_id = dbRS2("id")
	dbRS2.close
	get_user u_id
	userprofile = userprofile & "<h1>" & user(login) & "</h1>"
	userprofile = userprofile & "<p align=""right""><strong><i>"
	select case user(level)
		case 1
			userprofile = userprofile & "Site Subscriber"
		case 10
			userprofile = userprofile & "Site Admin"
	end select
	userprofile = userprofile & "</strong></i></p>"
	userprofile = userprofile & user(bio)
	userprofile = userprofile & "<hr>"
	userprofile = userprofile & "<h3>Contact Info</h3>"
	userprofile = userprofile & "Msn: " & user(msn) & "<br />"
	userprofile = userprofile & "Skype: " & user(skype) & "<br /><br />"
	userprofile = userprofile & "<hr>"
	userprofile = userprofile & "Member Since: " & dat2str(user(member_since)) & "<br />"
	userprofile = userprofile & "Last Visit: " & dat2str(user(last_visit)) & "<br />"
	userprofile = userprofile & "<img src=""" & get_avatar(user(id)) & """ style=""float:right;padding:2px;border:1px solid #c0c0c0;"">"
end function
%>